#include "include/EchoServer.hpp"
#include "include/config.hpp"
#include <iostream>
#include <unistd.h>
using std::cout;
using std::endl;


void test(){
     Config::getConfigObj()->set_config_path("/home/guiqi/c4th/smart-home-monitrory-sys/SmartHomeMonitoringSystem/conf/server.conf");
     int thread_num = stoi(Config::getConfigObj()->getValue("thread_num"));
     int task_num = stoi(Config::getConfigObj()->getValue("task_num"));
     int port = stoi(Config::getConfigObj()->getValue("port"));
     
     EchoServer server(thread_num,task_num,port,Config::getConfigObj()->getValue("ip"));

     server.start();
     server.stop();
}

int main()
{
    test();
    return 0;
}

